

class Person
{
    String name;
    int age;
    String sex;
    public Person(String name)
    {
        System.out.print(name+"常见了父类对象");
    }
    void eat()
    {
        System.out.println("我开始吃饭了");
    }
    void setName(String newName)
    {
        this.name=newName;
    }
    public void work()
    {
        System.out.println("我开始上班了");
    }
}


public class Stud extends Person
{
    String snum;
    String grade;
    String score;
    Stud(String name)
    {
        super(name);
        System.out.println("创建子类对象");
    }

    public void work()
    {
        super.work();
        System.out.println("我开始上学了");
    }
    public void setnum(String newsnum)
    {
        snum=newsnum;
    }
    public static void main(String[] args)
    {

    }
}